<template>
  <div class="tpl48-img">
    <div
      class="modulePadding"
      :style="`padding-top:${tplItemData.modulePadding}px; padding-bottom:${tplItemData.modulePadding}px;`">
      <div class="img65">
        <ul class="clearfix">
          <li v-for="(item,index) in tplItemData.dataset" :key="index">
            <a @click="openLink(item.link)">
              <img :src="item.pic" alt="">
            </a>
          </li>
        </ul>
      </div>
    </div>
    
  </div>
</template>

<script>
  import Vue from 'vue'
  import { openPage } from '@/utils/utils'
  export default Vue.extend({
    props: {
      tplItemData: {
        type: Object
      }
    },
    methods: {
      openLink(link) {
        openPage(link)
      },
    }
  })
</script>

<style lang="scss">
  @import "src/styles/mixin";
  .tpl48-img{
    .img65{
      overflow:hidden;
      border-radius:8px;
      li{
        float:left;
        width:49.5%;
        margin: 1% 1% 0 0;
        &:nth-child(1){
          margin-top:0;
        }
        &:nth-child(2){
          margin-top:0;
        }
        &:nth-child(2n){
          margin-right:0;
        }
        img{
          display:block;
          width:100%;
        }
      }
    }
  }
</style>
